You can use the fs.watch() method to watch for file changes in a directory. It will notify you when files are created, modified, or deleted within the specified directory.
fs.watch()